package com.yonyou.train.algorithem;


import org.apache.commons.codec.binary.Base64;

public class Base64_Algorithem {
    //sun不推荐用他们自己的base64,用apache的挺好
    /**
     * Base64解密
     */
    public static byte[] decryptBase64(byte[] dest){
        if(dest == null){
            return null;
        }
        return Base64.decodeBase64(dest);
    }
    /**
     * BASE64加密
     */
    public static byte[] encryptBASE64(byte[] oragin){
        if(oragin == null){
            return null;
        }
        return Base64.encodeBase64(oragin);
    }
}
